package ar.edu.uba.fi.jmit.monitorengine.mock;

import java.util.Date;

import ar.edu.uba.fi.jmit.monitorengine.core.EventServiceManager;

public class EventServiceManagerSpy extends EventServiceManager {
	
	private Date nextDate;
	
	private static EventServiceManager oldInstance;
	
	@Override
	protected Date getNewDate() {
		return nextDate;
	}

	public Date getNextDate() {
		return nextDate;
	}

	public void setNextDate(Date nextDate) {
		this.nextDate = nextDate;
	}
	
	public static void useSpy() {
		oldInstance = instance;
		instance = new EventServiceManagerSpy();
	}
	
	public static void stopUsingSpy() {
		instance = oldInstance;
	}

}
